<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="openAPI.shoppingDOM" import="openAPI.shoppingData"%>
<%@page import="java.util.*"%>

<%
	request.setCharacterEncoding("UTF-8");
	String query = request.getParameter("query");
%>
<h5>
	검색어 :
	<%=query%>
</h5>
<br>
<%
	shoppingDOM s = new shoppingDOM();
	shoppingData sd = new shoppingData();
	ArrayList<shoppingData> list = new ArrayList<shoppingData>();
	s.sendRequest(query);
	list = s.dataList;
%>
<table border="1">
	<tr>
		<%
			for (int i = 0; i < list.size(); i++) {
				sd = list.get(i);
		%>
		<td><%=sd.title%></td>
		<td><a href="<%=sd.link%>">사이트 바로가기!</a></td>
		<td><img src="<%=sd.image%>" width="100"></td>
		<td><%=sd.lprice%></td>
		<td><%=sd.hprice%></td>
	</tr>
	<%
		}
		list.clear();
	%>
	<br>
</table>
